import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:razer_one/app/main/extension/int_double_extension.dart';
import 'package:razer_one/app/main/model/http_model.dart';
import 'package:razer_one/app/main/services/http_manager.dart';
import 'package:razer_one/app/routes/app_routes.dart';

class LoginController extends GetxController {
  final usernameTfController = TextEditingController();
  final passwordTfController = TextEditingController();
  final marginY = 20.px;

  @override
  void onInit() {
    super.onInit();
    loadData();
  }

  loginBtnClick() {
    Get.offAllNamed(AppRoutes.initialRoute);
  }

  registerBtnClick() {
    Get.toNamed(AppRoutes.registerRoute);
  }

  // forgetPassWord() {
  //   Get.toNamed(AppRoutes.passwordRoute);
  // }

  loadData() async {
    HttpModel model = await HttpManager.request("/verifyUser",
        params: {"Phone": "good", "Password": "python"},
        httpType: HttpType.upload);
    print(model.data);
  }
}
